<?php 
$cs=Yii::app()->clientScript;
$cs->registerScript('truck_odom_no_dialog_view',<<<END
$(document).bind('keydown',function(e){if(e.keyCode==27){parent.$.modal.close();}});
$("a[href=#]").click(function(){
	\$parent=$(window.parent.document);
	\$parent.find("#Odometer_no_plate_no").val($(this).text()).removeClass('error').next('span').remove();
	parent.$.modal.close();
	return false;
});
END
)
?>
<?php echo CHtml::beginForm(array($this->action->id));?>
<div style="padding-left:30px">
	车牌号：<input type="text" name="keys[plate_no]" size="5" value="<?php echo isset($_GET['keys']['plate_no'])?$_GET['keys']['plate_no']:'';?>"/>&nbsp;&nbsp;
	模糊查询：<input type="radio" name="keys[blur]" value="1" checked/>是  
	<input type="radio" name="keys[blur]" value="0" <?php echo isset($_GET['keys']['blur'])&&$_GET['keys']['blur']==0?'checked':'';?>/>否&nbsp;&nbsp;
	<?php if($_GET['odom_date']!=''):?>
	<?php echo $_GET['odom_date']?>已填读数：<?php echo CHtml::dropDownList('check', isset($_GET['check'])?$_GET['check']:'0', array('0'=>'全部','1'=>'否'));?>&nbsp;&nbsp;
	<?php endif;?>
	<input type="hidden" name="odom_date" value="<?php echo $_GET['odom_date'];?>"/>
	<input type="submit" value="搜索"/>
</div>
<?php echo CHtml::endForm();?>
<table class="dataGrid" width=90%>
  <tbody>
  	<tr>
<?php foreach($models as $n=>$model): ?>
	<?php if($n>1&&$n%4==0) echo '</tr><tr>';?>
    <td><?php echo CHtml::link($model->plate_no,'#'); ?></td>
<?php endforeach; ?>
	</tr>
  </tbody>
</table>
<br/>
<?php $this->widget('CLinkPager',array('pages'=>$pages,'maxButtonCount'=>Yii::app()->params['dialog'][$this->action->id]['maxButtonCount'])); ?>